crPESelectPrinter

The crPESelectPrinter function specifies a printer other than the default printer as a print destination. You can use this function to enable the user to select a printer other than the default printer at print time. One way of doing this is to have your application call the common printer selection dialog box.

Declare Function crPESelectPrinter Lib "crwrap32.dll" (ByVal printJob As 
Integer, ByVal driverName As String, ByVal printerName As String, ByVal 
portName As String, crmode As crDEVMODE) As Integer
Parameters

printJob

Specifies the handle to the print job for which you want to select a printer.

driverName*

Specifies a pointer to a null-terminated string that contains the name of the printer driver for the selected printer.

printerName*

Specifies a pointer to a null-terminated string that contains the printer name for the selected printer.

portName*

Specifies a pointer to a null-terminated string that contains the port name for the port to which the selected printer is attached.

mode*

Specifies the crDEVMODE structure.

*The PRINTDLG structure, returned by the Windows API PrintDlg function, contains handles to crDEVMODE and DEVNAMES structures. This information can be used to obtain driverName, printerName, portName, and mode values for crPESelectPrinter.

Return Value

TRUE (1) if the call is successful, FALSE (0) if the call fails.

Remarks


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com